package com.itheima.jdk8date;

import java.time.LocalDate;
import java.time.Period;

/*
Period
 */
public class Demo08 {

    public static void main(String[] args) {
        Period period = Period.between(LocalDate.of(1921, 07, 01), LocalDate.now());

        System.out.println(period);
        System.out.println(period.getYears());
        System.out.println(period.getMonths());
        System.out.println(period.getDays());

        System.out.println(period.toTotalMonths());

    }
}
